<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
		
		test();
			function test(){
				//计数器
			var count = 0;
			
			for (var i = 100; i < 200; i++) {
				var g = parseInt(i/100%10);
				var s = parseInt(i/10%10);
				var b = parseInt(i%10);
				
				if(g==3){
					count++;
				}else if{s==3}{
					count++;
				}else if{b==3}{
					count++;
				}
			}
			
			console.log("3出现的次数为:"+count);	
			}
			
			
		</script>
	</body>
</html>
